<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="../js/vue.js"></script>
</head>

<body>
  <div id="app">
    <h2>{{message}}</h2>
    <!-- mustache语法中,不仅仅可以直接写变量,也可以写简单的表达式 -->
    <h2>{{firstName+lastName}}</h2>
    <h2>{{firstName}} {{lastName}}</h2>
    <h2>{{counter * 2}}</h2>
    <!-- -0 可以转换成数值型 -->
    <h2>{{counter2 - 0 + 1}}</h2>
  </div>

  <script>
    // Mustache 胡子/胡须

    //创建Vue实例,得到 ViewModel
    var vm = new Vue({
      el: '#app',
      data: {
        message: 'hello,vue',
        firstName: 'Kobe',
        lastName: 'bryant',
        counter: 100,
        counter2: "100"
      },
      methods: {},
      computed: {

      }
    });
  </script>
</body>

</html>